package com.useage.day03;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Boy {

	@Value(value="张三")
	private String name;

	// @Autowired
	// 使用哪个对象进行注入
	// @Resource(name="dog")
	
	@Autowired
	@Qualifier(value="dog")
	private Dog dog;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	public Dog getDog() {
		
		return dog;
	}

	public void setDog(Dog dog) {
		this.dog = dog;
	}
}
